import logging

from litestar.types import Scope


# 定义 After Exception 函数
async def after_exception_handler(exc: Exception, scope: Scope) -> None:
    logging.getLogger().exception(
        "an exception of type %s has occurred for requested path %s",
        type(exc).__name__,
        scope["path"],
    )
